import {
    request,
    POST,
    POST1,
    GET,
    PUT,
    DELETE
} from '@/https';


class Api {
    /*微信授权登录*/
    wxLogin(params) {
        return POST(`api/account/wxLogin`, params).then(res => res)
    };
    /*获取用户信息*/
    getAccountUserInfo(params) {
        return POST(`api/account/getAccountUserInfo`, params).then(res => res)
    };
    /*团队列表*/
    getTeamList(params) {
        return POST(`api/vip/teamList`, params).then(res => res)
    };
    /*激活码列表*/
    getActiveCodeList(params) {
        return POST(`api/vip/activeCodeList`, params).then(res => res)
    };
    /*用户明细列表*/
    getVipUserRecord(params) {
        return POST(`api/vip/vipUserRecord`, params).then(res => res)
    };
    /*获取会员中心广告图，vip价格，用户协议等*/
    getMetaByKey(params) {
        return POST(`api/meta/getMetaByKey`, params,false).then(res => res)
    };
    /*检测是否有购买激活码*/
    checkVipOrder(params) {
        return POST(`api/order/checkVipOrder`, params).then(res => res)
    };
    /*提现*/
    extract(params) {
        return POST(`api/order/extract`, params).then(res => res)
    };
    /*创建订单*/
    createVipOrder(params) {
        return POST(`api/order/createVipOrder`, params).then(res => res)
    };
    /*支付*/
    pay(params) {
        return POST(`api/pay/pay`, params).then(res => res)
    };
    /*检测支付*/
    checkSuccess(params) {
        return POST(`api/order/vipOrderDetail`, params).then(res => res)
    };
    /*获取验证码*/
    getVerificationCode(params) {
        return POST(`api/account/getVerificationCode`, params).then(res => res)
    };
    /*绑定手机号码*/
    bindMobileByCode(params) {
        return POST(`api/account/bindMobileByCode`, params).then(res => res)
    };
}

const api = new Api()

export default api